Skip to content

Fix CMake Warning#3034

Open
vndroid wants to merge 2 commits intoshadowsocks:masterfrom
vndroid:patch1
Open

Fix CMake Warning#3034
vndroid wants to merge 2 commits intoshadowsocks:masterfrom
vndroid:patch1

Conversation

@vndroid
Copy link
Copy Markdown
Contributor

@vndroid vndroid commented Apr 16, 2026

Such as:

CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

and CMake:

CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:430 (message):
  The package name passed to find_package_handle_standard_args() (PkgConfig)
  does not match the name of the calling package (PCRE2).  This can lead to
  problems in calling code that expects find_package() result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPkgConfig.cmake:108 (find_package_handle_standard_args)
  cmake/FindPCRE2.cmake:8 (include)
  CMakeLists.txt:50 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

and test warning:

/srv/shadowsocks-libev/tests/test_base64.c: In function 'test_encode_decode':
/srv/shadowsocks-libev/tests/test_base64.c:19:9: warning: unused variable 'decoded_len' [-Wunused-variable]
   19 |     int decoded_len = base64_decode(decoded, encoded, sizeof(decoded));
      |         ^~~~~~~~~~~
/srv/shadowsocks-libev/tests/test_base64.c:15:11: warning: unused variable 'ret' [-Wunused-variable]
   15 |     char *ret = base64_encode(encoded, sizeof(encoded), input, 5);
      |           ^~~
/srv/shadowsocks-libev/tests/test_base64.c: In function 'test_empty_input':
/srv/shadowsocks-libev/tests/test_base64.c:28:11: warning: unused variable 'ret' [-Wunused-variable]
   28 |     char *ret = base64_encode(encoded, sizeof(encoded), (const uint8_t *)"", 0);
      |           ^~~
/srv/shadowsocks-libev/tests/test_base64.c: In function 'test_single_byte':
/srv/shadowsocks-libev/tests/test_base64.c:43:9: warning: unused variable 'decoded_len' [-Wunused-variable]
   43 |     int decoded_len = base64_decode(decoded, encoded, sizeof(decoded));
      |         ^~~~~~~~~~~
/srv/shadowsocks-libev/tests/test_base64.c:40:11: warning: unused variable 'ret' [-Wunused-variable]
   40 |     char *ret = base64_encode(encoded, sizeof(encoded), input, 1);
      |           ^~~
/srv/shadowsocks-libev/tests/test_base64.c: In function 'test_two_bytes':
/srv/shadowsocks-libev/tests/test_base64.c:58:9: warning: unused variable 'decoded_len' [-Wunused-variable]
   58 |     int decoded_len = base64_decode(decoded, encoded, sizeof(decoded));
      |         ^~~~~~~~~~~
/srv/shadowsocks-libev/tests/test_base64.c:55:11: warning: unused variable 'ret' [-Wunused-variable]
   55 |     char *ret = base64_encode(encoded, sizeof(encoded), input, 2);
      |           ^~~
/srv/shadowsocks-libev/tests/test_base64.c: In function 'test_three_bytes':
/srv/shadowsocks-libev/tests/test_base64.c:74:9: warning: unused variable 'decoded_len' [-Wunused-variable]
   74 |     int decoded_len = base64_decode(decoded, encoded, sizeof(decoded));
      |         ^~~~~~~~~~~
/srv/shadowsocks-libev/tests/test_base64.c:71:11: warning: unused variable 'ret' [-Wunused-variable]
   71 |     char *ret = base64_encode(encoded, sizeof(encoded), input, 3);
      |           ^~~
/srv/shadowsocks-libev/tests/test_base64.c: In function 'test_roundtrip_binary':
/srv/shadowsocks-libev/tests/test_base64.c:92:9: warning: unused variable 'decoded_len' [-Wunused-variable]
   92 |     int decoded_len = base64_decode(decoded, encoded, sizeof(decoded));
      |         ^~~~~~~~~~~
/srv/shadowsocks-libev/tests/test_base64.c:89:11: warning: unused variable 'ret' [-Wunused-variable]
   89 |     char *ret = base64_encode(encoded, sizeof(encoded), input, 17);
      |           ^~~
/srv/shadowsocks-libev/tests/test_base64.c: In function 'test_invalid_chars':
/srv/shadowsocks-libev/tests/test_base64.c:101:9: warning: unused variable 'decoded_len' [-Wunused-variable]
  101 |     int decoded_len = base64_decode((uint8_t[4]){}, "!!!!", 4);
      |         ^~~~~~~~~~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant